home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4253 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: swidir.switch.ch!epflnews!not-for-mail
  2. From: "Stefan Monnier" <stefan.monnier@lia.di.epfl.ch>
  3. Newsgroups: comp.lang.lisp,comp.lang.c++
  4. Subject: Re: Why garbage collection?
  5. Date: 29 Jan 1996 09:41:36 GMT
  6. Organization: Ecole Polytechnique Federale de Lausanne
  7. Message-ID: <4ei4og$la1@info.epfl.ch>
  8. References: <rvillDL4v3n.I8r@netcom.com> <hbaker-2201961503250001@10.0.2.15> <4eae5s$66p@nz12.rz.uni-karlsruhe.de> <4ecmfo$as9@news2.ios.com>
  9. NNTP-Posting-Host: liasg9.epfl.ch
  10. Originator: monnier@lia.di.epfl.ch (Stefan Monnier)
  11.  
  12. In article <4ecmfo$as9@news2.ios.com>,
  13. Vlastimil Adamovsky <vlad@gramercy.ios.com> wrote:
  14. ] haible@ma2s2.mathematik.uni-karlsruhe.de (Bruno Haible) wrote:
  15. ] >Just look at the technical strength of the argument that GC is not
  16. ] >"in the tradition of the C community"...
  17. ] The technical strength of the argument is that C++ is still low level
  18. ] language with a high level language advantage and as such one it
  19. ] should do the all low level operations itself and if it is needed, it
  20. ] should implement the high level features by using its own low level
  21. ] implementations.
  22.  
  23. You mean like the virtual table stuff that could be implemented with low-level
  24. operations but instead is well hidden ? At least well enough to make C++-objects
  25. very inconvenient to represent any low-level data-structure.
  26.  
  27. Little example: the vtable can be considered a class-pointer, but C++ has been
  28. well enough designed to make it impossible for you to explicitely add any kind
  29. of info to the vtable.
  30.  
  31. C++ is not low-level enough in this respect.
  32. Furthermore, C++ is too low-level to make it reasonable to implement a copying
  33. GC, thanks to all the nasty casts the programmer might feel like doing.
  34.  
  35. Basically, C++ is a mix between low and "high"-level language and I'm not
  36. sure it's a good idea, since its high-level features are not really useable
  37. when you want to use the low-level features and the low-level features make it
  38. hard to take advantage of several aspects of the high-level features.
  39.  
  40.  
  41.         Stefan
  42.